package news;


public class News {

	private String title;
	private String author;
	private long datePublished;
	private long dateModified;
	private String subDomain;
	private String content;
	
	public News(String title, String author, long datePublished, long dateModified, String subdomain, String content){
		this.title = title;
		this.author = author;
		this.datePublished = datePublished;
		this.dateModified = dateModified;
		this.subDomain = subdomain;
		this.setContent(content);
	}
	
	public void setDateModified(long date){
		dateModified = date;
	}
	
	public String getTitle(){
		return title;
	}
	
	public String getAuthor(){
		return author;
	}
	
	public String getSubDomain(){
		return subDomain;
	}
	
	public long getDatePublished(){
		return datePublished;
	}
	
	public long getDateModified(){
		return dateModified;
	}
	
	public boolean equals(Object o){
		if(o instanceof News){
			if(!(author.equals(((News)o).getAuthor())))
				return false;
			if(!(title.equals(((News)o).getTitle())))
				return false;
			if(!(subDomain.equals(((News)o).getSubDomain())))
				return false;
			if(datePublished != ((News)o).getDatePublished())
				return false;
			return true;
		}
		return false;
	}



	public String getContent() {
		return content;
	}



	public void setContent(String content) {
		this.content = content;
	}
}

